﻿using MengLin.OOP.DesignPattern.Command.ControlTV.Entity;
using MengLin.OOP.DesignPattern.Command.ControlTV.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MengLin.OOP.DesignPattern.Command.ControlTV.Implements
{
    /// <summary>
    /// 开机命令
    /// </summary>
    public class CommandOn : ICommand
    {
        private TV myTv;

        public CommandOn(TV tv)
        {
            myTv = tv;
        }

        /// <summary>
        /// 执行
        /// </summary>
        public void Execute()
        {
            myTv.TurnOn();
        }
    }
}
